<template>
  <el-menu style="min-height: 100%; overflow-x: hidden"
           background-color="rgb(48, 65, 86)"
           text-color="#fff"
           active-text-color="#ffd04b"
           :collapse-transition="false"
           :collapse="isCollapse"
           router
  >
    <div style="height: 60px; line-height: 60px; text-align: center">
      <img src="../assets/logo.png" alt="" style="width: 20px; position: relative; top: 5px; right: 5px">
      <b style="color: white" v-show="logoTextShow">比赛信息管理系统</b>

    </div>
      <el-menu-item index="/homeview" v-if="userLevel=== '1' ">
        <i class="el-icon-user-solid"></i>
        <span>用户信息管理</span>
      </el-menu-item>


      <el-menu-item index="/admin/contestinfo" v-if="userLevel=== '1'">
        <i class="el-icon-s-order"></i>
        <span>发布竞赛</span>
      </el-menu-item>

    <el-menu-item index="/CreateView">
      <i class="el-icon-s-order"></i>
      <span>上传数据</span>
    </el-menu-item>

    <el-menu-item index="/AwardInfo">
      <i class="el-icon-s-order"></i>
      <span>获奖信息</span>
    </el-menu-item>

    <el-menu-item index="/StatisticsAndManagement" v-if="userLevel=== '1'">
      <i class="el-icon-s-order"></i>
      <span>管理和统计</span>
    </el-menu-item>

    </el-menu>
</template>

<script>
import { mapState } from 'vuex';
export default {

  name: "Aside",
  props: {
    isCollapse: Boolean,
    logoTextShow: Boolean,

  },
  data(){
    return{
      localStorage
    }
  },

  computed: {

    userLevel() {
      return window.localStorage.getItem('level');
    }
  }
}
</script>

<style scoped>

</style>
